package com.practice.order.intercepter;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

@Component
public class XTokenRequestIntercepter implements RequestInterceptor {

    /**
     * 添加请求头
     * 请求拦截器
     * @param requestTemplate 请求模板
     */
    @Override
    public void apply(RequestTemplate requestTemplate) {
        System.out.println("XTokenRequestIntercepter.............");
        requestTemplate.header("X-Token", "123456");
    }
}
